<template>
  <div class="big-div">
    <div class="headers">
      <img
        src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1534136662314&di=af7ec227db5e118a5626a94ab97026f3&imgtype=0&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F4bed2e738bd4b31ccda81d7a8bd6277f9f2ff85f.jpg"
        alt
      />
    </div>
    <ul class="ulone">
      <li>
        <p>60</p>
        <p>已报名</p>
      </li>
      <li>
        <p>60</p>
        <p>已报名</p>
      </li>
      <li>
        <p>60</p>
        <p>已报名</p>
      </li>
      <li>
        <p>60</p>
        <p>已报名</p>
      </li>
    </ul>
    <ul class="ul-tow">
      <li>选手描述</li>
      <li>这个人很懒什么都没有留下~~</li>
    </ul>
    <ul class="ul-shree">
      <li>选手照片</li>
      <li>
        <img
          src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1534136662314&di=af7ec227db5e118a5626a94ab97026f3&imgtype=0&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F4bed2e738bd4b31ccda81d7a8bd6277f9f2ff85f.jpg"
          alt
        />
      </li>
    </ul>
    <scroll-view
      :style="{'height': '300px'}"
      :scroll-y="true"
      @scrolltolower="scrolltolower"
      @scroll="scroll"
    >
      <div :style="{'height': '800px','background-color':'rgb(245, 245, 245)'}">
        <ul class="ul-box">
          <li>票数贡献榜</li>
          <li>
            <img src="/static/tabs/2.png" alt />
          </li>
          <li>喜欢我的人 在这里驻留</li>
          <li @click="gogift">送TA礼物加票</li>
        </ul>
      </div>
    </scroll-view>
    <div class :style="{'height': 'heights','background-color':'white'}">
      <ul class="ul-box-tow">
        <li>投票记录</li>
        <li class="li-box" v-for="(item,index) in contentList" v-if="index<num" :key="index">
          <p>
            <span>{{item.name}}</span>
            <span>{{item.time}}</span>
          </p>
          <p>+1</p>
        </li>
        <p @click="mademon()" class="ckgd">查看更多</p>
      </ul>
    </div>
    <ul class="ul-gift">
      <li class="li-gift" @click="goIndex">
        <img src="/static/tabs/home-active.png" alt />
        <p>首页</p>
      </li>
      <li>
        <img src="/static/tabs/4.png" alt />
        <p>投票</p>
      </li>
      <li @click="goGift">
        <img src="/static/tabs/3.png" alt />
        <p>送礼</p>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: {},

  data() {
    return {
      num: 5,
      heights: "600px",
      contentList: [
        {
          name: "张三",
          time: "2019-10-28 12:25:36"
        },
        {
          name: "李四",
          time: "2019-11-28 12:25:36"
        },
        {
          name: "王五",
          time: "2019-12-28 12:25:36"
        },
        {
          name: "李四",
          time: "2019-11-28 12:25:36"
        },
        {
          name: "李四",
          time: "2019-11-28 12:25:36"
        },
        {
          name: "李四",
          time: "2019-11-28 12:25:36"
        },
        {
          name: "李四",
          time: "2019-11-28 12:25:36"
        },
        {
          name: "李四",
          time: "2019-11-28 12:25:36"
        }
      ]
    };
  },
  computed: {},
  created() {},
  mounted() {},
  watch: {},
  methods: {
    scrolltolower() {
      //   console.log(7);
    },
    scroll(e) {
      //   console.log(6);
      //   console.log(e);
    },
    mademon() {
      this.num = this.contentList.length;
    },
    gogift() {
      const url = "../gift/main";
      mpvue.navigateTo({ url });
    },
    goGift() {
      const url = "../gift/main";
      mpvue.navigateTo({ url });
    },
    goIndex(){
      const url = "../index/main";
      mpvue.switchTab({ url });
    }
  },
  components: {}
};
</script>

<style scoped>
.big-div {
  background-color: rgb(245, 245, 245);
}
.headers {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}
.headers img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}
.ulone {
  background-color: #31c9b1;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  margin: 20px 10px 0 10px;
  /* border-radius: 15px; */
}
.ulone li {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: wheat;
  font-size: 14px;
  font-weight: 600;
}
.ul-tow {
  border: 1px solid rgb(134, 134, 134);
  width: 90%;
  margin: 15px;
  background-color: white;
}
.ul-tow li:nth-child(1) {
  height: 30px;
  widows: 100%;
  text-align: center;
  line-height: 30px;
  color: thistle;
  border-bottom: 1px solid rgb(189, 189, 189);
}
.ul-tow li:nth-child(2) {
  height: 50px;
  color: thistle;
}
.ul-shree {
  /* border: 1px solid rgb(134, 134, 134); */
  width: 90%;
  margin: 15px;
  background-color: white;
}
.ul-shree li:nth-child(1) {
  height: 30px;
  widows: 100%;
  text-align: center;
  line-height: 30px;
  color: thistle;
  border-bottom: 1px solid rgb(189, 189, 189);
}
.ul-shree li:nth-child(2) img {
  width: 94%;
  padding: 10px;
}
.ul-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ul-box li:nth-child(1) {
  background-color: #9df848;
  color: rgb(129, 129, 129);
  width: 100%;
  text-align: center;
  font-weight: 300;
}
.ul-box li:nth-child(2) img {
  width: 189px;
  height: 140px;
}
.ul-box li:nth-child(4) {
  width: 70%;
  height: 50px;
  background-color: #31c9b1;
  border-radius: 20px;
  text-align: center;
  line-height: 50px;
  margin-top: 20px;
  color: white;
  font-weight: 600;
}
.ul-box-tow li:nth-child(1) {
  text-align: center;
  line-height: 40px;
  /* border-bottom: 1px solid rgb(139, 139, 139); */
  color: rgb(139, 139, 139);
  font-weight: 600;
}
.ul-box-tow .li-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 85px;
  width: 90%;
  border-top: 1px solid rgb(139, 139, 139);
  margin-left: 17px;
}
.li-box p:nth-child(1) {
  flex: 3;
  display: flex;
  flex-direction: column;
  justify-items: center;
}
.li-box p:nth-child(2) {
  flex: 2;
  text-align: center;
  color: red;
}
.ckgd {
  width: 90%;
  height: 40px;
  background-color: royalblue;
  color: white;
  margin: 0 0 60px 15px;
  text-align: center;
  line-height: 40px;
  font-weight: 600;
  border-radius: 20px;
}
.ul-gift {
  display: flex;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
  width: 100%;
}
.li-gift {
  display: flex;
  flex-direction: column;
}
.ul-gift li image {
  width: 30px;
  height: 30px;
}
</style>
